home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
EPISODE
/
JKM_PCG.GOO
/
cog_s1l2_exploswitch.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
75 lines
# Jedi Knight Missions Cog Script
#
# S1L2_Exploswitch.COG
#
# Shootable switch cog for level 2
#
# [DB & TL]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#=========================================================
symbols
message damaged
message timer
message activated
surface panel mask=0x008 linkid=1
surface button mask=0x008 linkid=2
thing sparkspot nolink
thing door linkid=3
template spark=+sparks local
sound sparksound
sound kylelocked
sound wav0=lvrclik2.wav
flex minimumDelay=2.0
flex maximumDelay=4.0
flex nextSpark=0.5 local
end
#=========================================================
code
activated:
if (GetSenderId() == 3)
{
PlaySoundLocal(kylelocked, 1, 0, 0);
PlaySoundLocal(wav0, 1, 0, 0);
}
return;
damaged:
if (GetWallCel(panel) == 1) return;
if (GetWallCel(button) == 1) return;
if ((GetSenderId() == 1) || (GetSenderId() == 2))
{
SetWallCel(panel , 1);
SetWallCel(button , 1);
MoveToFrame(door, 1, 5);
CreateThing(spark, sparkspot);
PlaySoundThing(sparksound, sparkspot, 1, -1, -1, 0);
SetTimer(nextspark);
}
return;
#............................................................
timer:
CreateThing(spark, sparkspot);
PlaySoundThing(sparksound, sparkspot, 1, -1, -1, 0);
nextSpark = minimumDelay + (Rand() * (maximumDelay - minimumDelay));
SetTimer(nextSpark);
return;
end